home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Utilities / Commodities / ClipHistory / Rexx / Test.cliph < prev   
Encoding:
Text File  |  1997-04-10  |  645 b   |  33 lines

  1. /* Example ARexx script for ClipHistory 2.0+.
  2.  * Shows some information about the history.
  3.  */
  4.  
  5. OPTIONS RESULTS
  6. ADDRESS CLIPHISTORY0
  7.  
  8. HistoryInfo STEM Info.
  9.  
  10. IF Info.Items > 0 THEN DO
  11.     Chrs = 0
  12.     TextClips = 0
  13.  
  14.     DO i = 1 TO Info.Items
  15.         ItemInfo i STEM Clip.
  16.  
  17.         IF RC = 0 THEN DO
  18.             Chrs = Chrs + Clip.NumCHRS
  19.  
  20.             IF Clip.NumCHRS > 0 THEN DO
  21.                 TextClips = TextClips + 1
  22.             END
  23.         END
  24.     END
  25.  
  26.     SAY "The history contains" Info.Items "clips. There are" TextClips "clips that contain text."
  27.     SAY "Average clip size is" Info.Size / Info.Items "bytes."
  28.     SAY "There is a total of" Chrs "IFF FTXT CHRS chunks."
  29. END
  30. ELSE DO
  31.     SAY "The history is empty"
  32. END
  33.